<?php

class teacher_Model_DbTable_Dbteacher extends Zend_Db_Table_Abstract
{

    protected $_name = 'tbl_teacher';
	//function for getting record user by user_id
	function insertTeacher($data)
	{ 
		$db = $this->getAdapter();
		$db->getProfiler()->setEnabled(true);
     	$array_data = array(
     			"id_code"	=>	$data["id_code"],
     			"dpt_id"	=>	$data["department_id"],
     			"teacher_name"	=>	$data["teacher_name"],
     			"gender"	=>	$data["gender"],
     			"pob"	=>	$data["pob"],
     			"dob"	=>	$data["dob"],
     			"tel" =>$data["tel"],
     			"email" =>$data["email"],
     			"address"	=>$data["address"],
     			//"password" =>$data["password"],
     			"education_level" =>$data["education_level"],
     			"finish_from" =>$data["finish_from"],
     			"year" =>$data["year"],
     			"description" =>$data["description"],
     			"status" =>$data["status"],
     			);
     	$id=$this->insert($array_data);
     	//echo $id;exit();
     	Zend_Debug::dump($db->getProfiler()->getLastQueryProfile()->getQuery());
     	Zend_Debug::dump($db->getProfiler()->getLastQueryProfile()->getQueryParams());
     	$db->getProfiler()->setEnabled(false);
	}
	public function addteacher($arr)
	{
		//print_r($arr);exit();
		$array_data = array(
				"id"	=>	$arr["id_code"],
     			"dpt_id"	=>	$arr["dpt_id"],
     			"teacher_name"	=>	$arr["teacher_name"],
     			"gender"	=>	$arr["gender"],
     			"pob"	=>	$arr["pob"],
     			"dob"	=>	$arr["dob"],
     			"tel" =>$arr["tel"],
     			"email" =>$arr["email"],
     			"password" =>$arr["password"],
     			"education_level" =>$arr["education_level"],
     			"finish_from" =>$arr["finish_from"],
     			"year" =>$arr["year"],
     			"description" =>$arr["description"],
     			"status" =>$arr["status"],
		);
		$id=$this->insert($array_data);
	
	
	}
}

